#include <common.h>
#include <Game.h>
// #include <getopt.h>


int main([[maybe_unused]] const int argc, [[maybe_unused]] char *const *argv) {
	/*system("cls");
	static struct option long_options[] = {
			{ .name="help", .has_arg=no_argument, .flag=nullptr, .val='h' },
			{ .name="log-path", .has_arg=optional_argument, .flag=nullptr, .val='f' },
			{ .name="mode", .has_arg=optional_argument, .flag=nullptr, .val='m' },
			{ .name="init-life", .has_arg=optional_argument, .flag=nullptr, .val='l' },
			{ .name=nullptr, .has_arg=0, .flag=nullptr, .val=0 }
	};

	static char *const short_options = (char *)"hf::m::l::";

	int option_index = 0, ret;
	while ((ret = getopt_long(argc, argv, short_options, long_options, &option_index)) != -1) {
		switch (ret) {
			case 'h':
				std::cout << "H" << std::endl;
				break;
			case 'f':
				std::cout << "HAVE option: -f" << std::endl;
				std::cout << "The value of --log-path is " << optarg << std::endl;
				break;
			case 'm':
				std::cout << "HAVE option: -m" << std::endl;
				std::cout << "The value of --mode is " << optarg << std::endl;
				break;
			case '?':
			default:
				break;
		}
	}*/

	using namespace entity;

	PInfo player_a{
			.hp = 5,
			.width = 2,
			.color = "\033[0;30;46m",
			.name = "A",
			.msg_shift = { 0, 0 },
			.location = { 10, 10 },
			.direction = Enum::D_RIGHT,
	};
	PInfo player_b{
			.hp = 5,
			.width = 2,
			.color = "\033[0;30;43m",
			.name = "B",
			.msg_shift = { 44, 0 },
			.location = { 16, 14 },
			.direction = Enum::D_RIGHT,
	};

	Game new_game(player_a, player_b);
	new_game.start();
	system("pause");
	return 0;
}